//
//  BaseViewController.m
//  DouBan
//
//  Created by dllo on 16/6/23.
//  Copyright © 2016年 zuzhiming. All rights reserved.
//

#import "BaseViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.navigationController.navigationBar.translucent = NO;
    self.tabBarController.tabBar.translucent = NO;
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"bg_nav@2x"] forBarMetrics:UIBarMetricsDefault];
    
    //加载设置导航标题
    [self setTitles];
    
    /*
     //隐藏返回按钮
     //    self.navigationItem.hidesBackButton = YES;
     
     [self.navigationItem setHidesBackButton:YES animated:YES];
     */
    
}

//设置每个页面导航标题
- (void)setTitles
{
    switch (self.navigationController.tabBarItem.tag - 1000) {
        case 0:
            self.navigationItem.title = @"活动";

            break;
        case 1:
            self.navigationItem.title = @"电影";
             
            break;
        case 2:
            self.navigationItem.title = @"影院";
    
            break;
        case 3:
            self.navigationItem.title = @"我的";
            
            break;
            
    }

}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
